/*
 * QmcParameters.h
 *
 *  Created on:
 *      Author: snirgazit
 */

#ifndef QMCPARAMETERS_H_
#define QMCPARAMETERS_H_
#include "def.h"
#include <map>
using namespace std;
template<typename T>
class Param {
	bool init_;
	T val_;
public:
	Param() {
		init_ = false;
	}
	;
	void setVal(T val) {
		val_ = val;
		init_ = true;
	}
	T getVal() const {
		try {
			if (!init_)
				throw string("Uninitialized Params");
			return val_;
		} catch (string &e) {
			std::cout << e;
			exit(-1);
		}
	}
};

typedef map<string, bool> ToMeasure;


struct QmcParameters {
        Param<int> NumP; // Number of Particles
        Param<int> M; // Number of Time slices
        Param<int> mbar; // Time window
        Param<int> dim; // Number of Dimensions
        Param<int> mbarSwap;
        Param<int> mbarOpen;
        Param<int> mbarWiggle;
        Param<int> NumPMoving; // Number of Particles
        Param<int> NumPFixed; // Number of Particles
        Param<int> numThermal; // Number of Runs till Thermal
        Param<double> beta; // Inverse Temperature
        Param<double> lambda; // particles "mass"
        Param<double> epsilon; // length of imaginary basis time segment
        Param<double> sigma; // Var of RW in a single imaginary time interval
        Param<string> outPath;
        Param<string> initPath;
        Param<bool> init;
        Param<ToMeasure> toMeasure;
        Param<double> swapProb;
        Param<int> minNumOfMeasure;
        Param<int> seed;
        Param<double> openProb;
        Param<double> sweepRateFactor;
        Param<int> rndBufferSize;
        Param<int> numJqJqPoints;
        Param<double> LAngs, rZeroFactor;
        // PT simulation number
        Param<int> confNum;
        Param<bool> flag;
        Param<double> greenFactorF, greenFactorV;
        Param<double> gamma;
        Param<int> step;
        Param<int> rate;
        Param<double> rZeroScale;
        Param<double> latticeStrength;
        Param<double> period;
        Param<int> numOfVacancies;
        Param<int> numOfInterstitals;
        Param<double> disXi;
        Param<double> disStrength;
        Param<string> latFileInit;
        Param<string> initialType;
        Param<double> dumpTime;
        Param<double> finishTime;
        Param<int> numOfCores;
        Param<int> gridResExtPot;
        Param<int> numOfBins;
        Param<int> numOfKvecSym;
        Param<int> binSize;
};

struct SimulationParameters{
	double gamma; // Open Close Ratio
	int mbarOpen;
	int mbarSwap;
	int mbarClose;
	int mbarWiggle;
};


#endif /* QMCPARAMETERS_H_ */
